package cn.wolfcode.luowowo.flight.util;


import cn.wolfcode.luowowo.common.util.AjaxResult;
import org.apache.http.HttpResponse;
import org.apache.http.util.EntityUtils;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class FlightUtil implements Serializable {

    //创建一个方法发送请求获取航班信息
    public static AjaxResult getFlightInfo(String orgCity, String dstCity, String depTime) {
        AjaxResult result = new AjaxResult();
        String host = "http://airinfo.market.alicloudapi.com";
        String path = "/airInfos";
        String method = "POST";
        String appcode = "3e90f4e2e99f490683b110551c61a788";
        Map<String, String> headers = new HashMap<String, String>();
        //最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105
        headers.put("Authorization", "APPCODE " + appcode);
        //根据API的要求，定义相对应的Content-Type
        headers.put("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
        Map<String, String> querys = new HashMap<String, String>();
        Map<String, String> bodys = new HashMap<String, String>();
        bodys.put("arrive_code", dstCity);
        bodys.put("leave_code", orgCity);
        bodys.put("query_date", depTime);


        try {
            /**
             * 重要提示如下:
             * HttpUtils请从
             * https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/src/main/java/com/aliyun/api/gateway/demo/util/HttpUtils.java
             * 下载
             *
             * 相应的依赖请参照
             * https://github.com/aliyun/api-gateway-demo-sign-java/blob/master/pom.xml
             */
            //HttpResponse response = HttpUtils.doPost(host, path, method, headers, querys, bodys);
            //System.out.println(response.toString());
            //获取response的body
            //System.out.println(EntityUtils.toString(response.getEntity()));EntityUtils只能调用一次,因此不能打印之后又调一次
            //String flightInfo=EntityUtils.toString(response.getEntity());

            //假数据
            String flightInfo = "{\"msg\": \"查询成功!\", \"errCode\": 0, \"flightInfos\": [{\"airlineCompany\": \"中国南方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"浦东国际机场\", \"arTime\": \"2019-10-29 09:40:00\", \"tkTime\": \"2019-10-29 06:55:00\", \"lowestPriceInfo\": {\"discount\": 8.3, \"price\": 1350, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"CZ3505\", \"onTimeRate\": 0.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T2航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 10:05:00\", \"tkTime\": \"2019-10-29 07:30:00\", \"lowestPriceInfo\": {\"discount\": 9.4, \"price\": 1520, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU9307\", \"onTimeRate\": 98.32, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"上海航空有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 10:05:00\", \"tkTime\": \"2019-10-29 07:30:00\", \"lowestPriceInfo\": {\"discount\": 9.4, \"price\": 1520, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"FM9307\", \"onTimeRate\": 98.32, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"上海吉祥航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 10:40:00\", \"tkTime\": \"2019-10-29 08:15:00\", \"lowestPriceInfo\": {\"discount\": 7.9, \"price\": 1284, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"HO1077\", \"onTimeRate\": 0.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"上海航空有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 11:05:00\", \"tkTime\": \"2019-10-29 08:30:00\", \"lowestPriceInfo\": {\"discount\": 9.9, \"price\": 1600, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"FM9301\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 11:05:00\", \"tkTime\": \"2019-10-29 08:30:00\", \"lowestPriceInfo\": {\"discount\": 9.9, \"price\": 1600, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU9301\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国南方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 11:25:00\", \"tkTime\": \"2019-10-29 08:50:00\", \"lowestPriceInfo\": {\"discount\": 9.8, \"price\": 1590, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"CZ3596\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T2航站楼\"}, {\"airlineCompany\": \"海南航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"浦东国际机场\", \"arTime\": \"2019-10-29 11:35:00\", \"tkTime\": \"2019-10-29 09:00:00\", \"lowestPriceInfo\": {\"discount\": 7.2, \"price\": 1170, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"HU7132\", \"onTimeRate\": 0.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"上海航空有限公司\", \"leaveBuilding\": \"T1航站楼\", \"transferList\": [], \"leavePort\": \"浦东国际机场\", \"arTime\": \"2019-10-29 11:35:00\", \"tkTime\": \"2019-10-29 09:00:00\", \"lowestPriceInfo\": {\"discount\": 9.4, \"price\": 1520, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"FM9303\", \"onTimeRate\": 94.87, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T1航站楼\", \"transferList\": [], \"leavePort\": \"浦东国际机场\", \"arTime\": \"2019-10-29 11:35:00\", \"tkTime\": \"2019-10-29 09:00:00\", \"lowestPriceInfo\": {\"discount\": 9.4, \"price\": 1520, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU9303\", \"onTimeRate\": 94.87, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 12:00:00\", \"tkTime\": \"2019-10-29 09:20:00\", \"lowestPriceInfo\": {\"discount\": 9.9, \"price\": 1600, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU5393\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"上海航空有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 12:05:00\", \"tkTime\": \"2019-10-29 09:30:00\", \"lowestPriceInfo\": {\"discount\": 9.9, \"price\": 1600, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"FM9305\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 12:05:00\", \"tkTime\": \"2019-10-29 09:30:00\", \"lowestPriceInfo\": {\"discount\": 9.9, \"price\": 1600, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU9305\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国南方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 12:25:00\", \"tkTime\": \"2019-10-29 09:50:00\", \"lowestPriceInfo\": {\"discount\": 9.8, \"price\": 1590, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"CZ3548\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T2航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 13:05:00\", \"tkTime\": \"2019-10-29 10:30:00\", \"lowestPriceInfo\": {\"discount\": 9.9, \"price\": 1600, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU5303\", \"onTimeRate\": 98.32, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国南方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 13:25:00\", \"tkTime\": \"2019-10-29 10:50:00\", \"lowestPriceInfo\": {\"discount\": 9.8, \"price\": 1590, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"CZ3534\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T2航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 14:05:00\", \"tkTime\": \"2019-10-29 11:30:00\", \"lowestPriceInfo\": {\"discount\": 10.0, \"price\": 1620, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU5305\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国南方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 14:15:00\", \"tkTime\": \"2019-10-29 11:50:00\", \"lowestPriceInfo\": {\"discount\": 9.8, \"price\": 1590, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"CZ3524\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T2航站楼\"}, {\"airlineCompany\": \"金鹏航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"浦东国际机场\", \"arTime\": \"2019-10-29 14:40:00\", \"tkTime\": \"2019-10-29 11:55:00\", \"lowestPriceInfo\": {\"discount\": 7.6, \"price\": 1230, \"standardPrice\": 1230, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"Y87142\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"海南航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"浦东国际机场\", \"arTime\": \"2019-10-29 14:40:00\", \"tkTime\": \"2019-10-29 11:55:00\", \"lowestPriceInfo\": {\"discount\": 7.2, \"price\": 1170, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"HU7142\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"深圳航空有限责任公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 15:05:00\", \"tkTime\": \"2019-10-29 12:35:00\", \"lowestPriceInfo\": {\"discount\": 8.4, \"price\": 1364, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"ZH1837\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国国际航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 15:05:00\", \"tkTime\": \"2019-10-29 12:35:00\", \"lowestPriceInfo\": {\"discount\": 8.1, \"price\": 1320, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"CA1837\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 15:10:00\", \"tkTime\": \"2019-10-29 12:30:00\", \"lowestPriceInfo\": {\"discount\": 8.4, \"price\": 1360, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU5301\", \"onTimeRate\": 96.61, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"上海航空有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 16:05:00\", \"tkTime\": \"2019-10-29 13:30:00\", \"lowestPriceInfo\": {\"discount\": 8.4, \"price\": 1360, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"FM9309\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 16:05:00\", \"tkTime\": \"2019-10-29 13:30:00\", \"lowestPriceInfo\": {\"discount\": 8.4, \"price\": 1360, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU9309\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国南方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 16:25:00\", \"tkTime\": \"2019-10-29 13:50:00\", \"lowestPriceInfo\": {\"discount\": 9.8, \"price\": 1590, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"CZ3532\", \"onTimeRate\": 98.32, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T2航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 17:05:00\", \"tkTime\": \"2019-10-29 14:30:00\", \"lowestPriceInfo\": {\"discount\": 9.9, \"price\": 1600, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU5307\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国南方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 17:35:00\", \"tkTime\": \"2019-10-29 14:50:00\", \"lowestPriceInfo\": {\"discount\": 9.8, \"price\": 1590, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"CZ3538\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T2航站楼\"}, {\"airlineCompany\": \"上海航空有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 18:05:00\", \"tkTime\": \"2019-10-29 15:30:00\", \"lowestPriceInfo\": {\"discount\": 9.9, \"price\": 1600, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"FM9315\", \"onTimeRate\": 0.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 18:05:00\", \"tkTime\": \"2019-10-29 15:30:00\", \"lowestPriceInfo\": {\"discount\": 9.9, \"price\": 1600, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU9315\", \"onTimeRate\": 0.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国南方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 18:25:00\", \"tkTime\": \"2019-10-29 15:50:00\", \"lowestPriceInfo\": {\"discount\": 9.8, \"price\": 1590, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"CZ3540\", \"onTimeRate\": 98.32, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T2航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T1航站楼\", \"transferList\": [], \"leavePort\": \"浦东国际机场\", \"arTime\": \"2019-10-29 18:55:00\", \"tkTime\": \"2019-10-29 16:15:00\", \"lowestPriceInfo\": {\"discount\": 9.4, \"price\": 1520, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU9527\", \"onTimeRate\": 96.61, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"上海航空有限公司\", \"leaveBuilding\": \"T1航站楼\", \"transferList\": [], \"leavePort\": \"浦东国际机场\", \"arTime\": \"2019-10-29 18:55:00\", \"tkTime\": \"2019-10-29 16:15:00\", \"lowestPriceInfo\": {\"discount\": 9.4, \"price\": 1520, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"FM9527\", \"onTimeRate\": 96.61, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 18:55:00\", \"tkTime\": \"2019-10-29 16:30:00\", \"lowestPriceInfo\": {\"discount\": 9.9, \"price\": 1600, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU5313\", \"onTimeRate\": 0.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国南方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 19:35:00\", \"tkTime\": \"2019-10-29 16:50:00\", \"lowestPriceInfo\": {\"discount\": 8.3, \"price\": 1350, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"CZ3526\", \"onTimeRate\": 96.61, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T2航站楼\"}, {\"airlineCompany\": \"中国国际航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"浦东国际机场\", \"arTime\": \"2019-10-29 19:40:00\", \"tkTime\": \"2019-10-29 16:55:00\", \"lowestPriceInfo\": {\"discount\": 6.0, \"price\": 970, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"CA1865\", \"onTimeRate\": 98.32, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"深圳航空有限责任公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"浦东国际机场\", \"arTime\": \"2019-10-29 19:40:00\", \"tkTime\": \"2019-10-29 16:55:00\", \"lowestPriceInfo\": {\"discount\": 6.4, \"price\": 1030, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"ZH1865\", \"onTimeRate\": 98.32, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 20:05:00\", \"tkTime\": \"2019-10-29 17:30:00\", \"lowestPriceInfo\": {\"discount\": 6.9, \"price\": 1120, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU9327\", \"onTimeRate\": 98.32, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"上海航空有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 20:05:00\", \"tkTime\": \"2019-10-29 17:30:00\", \"lowestPriceInfo\": {\"discount\": 6.9, \"price\": 1120, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"FM9327\", \"onTimeRate\": 98.32, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"上海吉祥航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 20:05:00\", \"tkTime\": \"2019-10-29 17:40:00\", \"lowestPriceInfo\": {\"discount\": 6.0, \"price\": 964, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"HO1287\", \"onTimeRate\": 94.87, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国南方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"浦东国际机场\", \"arTime\": \"2019-10-29 20:30:00\", \"tkTime\": \"2019-10-29 17:40:00\", \"lowestPriceInfo\": {\"discount\": 6.4, \"price\": 1030, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"CZ380\", \"onTimeRate\": 98.32, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T2航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 21:05:00\", \"tkTime\": \"2019-10-29 18:30:00\", \"lowestPriceInfo\": {\"discount\": 8.4, \"price\": 1360, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU9313\", \"onTimeRate\": 98.32, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"上海航空有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 21:05:00\", \"tkTime\": \"2019-10-29 18:30:00\", \"lowestPriceInfo\": {\"discount\": 8.4, \"price\": 1360, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"FM9313\", \"onTimeRate\": 98.32, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国南方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 21:20:00\", \"tkTime\": \"2019-10-29 18:50:00\", \"lowestPriceInfo\": {\"discount\": 6.4, \"price\": 1030, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"CZ3572\", \"onTimeRate\": 98.32, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T2航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 22:00:00\", \"tkTime\": \"2019-10-29 19:15:00\", \"lowestPriceInfo\": {\"discount\": 6.4, \"price\": 1040, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU5315\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国南方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 22:25:00\", \"tkTime\": \"2019-10-29 19:50:00\", \"lowestPriceInfo\": {\"discount\": 6.4, \"price\": 1030, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"CZ3504\", \"onTimeRate\": 98.32, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T2航站楼\"}, {\"airlineCompany\": \"中国国际航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 22:25:00\", \"tkTime\": \"2019-10-29 20:00:00\", \"lowestPriceInfo\": {\"discount\": 5.2, \"price\": 840, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"CA1830\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"深圳航空有限责任公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 22:25:00\", \"tkTime\": \"2019-10-29 20:00:00\", \"lowestPriceInfo\": {\"discount\": 5.2, \"price\": 848, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"ZH1830\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国南方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 23:00:00\", \"tkTime\": \"2019-10-29 20:15:00\", \"lowestPriceInfo\": {\"discount\": 5.3, \"price\": 860, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"CZ3582\", \"onTimeRate\": 94.87, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T2航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 23:05:00\", \"tkTime\": \"2019-10-29 20:35:00\", \"lowestPriceInfo\": {\"discount\": 4.9, \"price\": 790, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU5309\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国南方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 23:15:00\", \"tkTime\": \"2019-10-29 20:40:00\", \"lowestPriceInfo\": {\"discount\": 5.3, \"price\": 860, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"CZ3546\", \"onTimeRate\": 100.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T2航站楼\"}, {\"airlineCompany\": \"中国南方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"浦东国际机场\", \"arTime\": \"2019-10-29 23:55:00\", \"tkTime\": \"2019-10-29 21:20:00\", \"lowestPriceInfo\": {\"discount\": 4.8, \"price\": 780, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"CZ3585\", \"onTimeRate\": 98.32, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T2航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T1航站楼\", \"transferList\": [], \"leavePort\": \"浦东国际机场\", \"arTime\": \"2019-10-30 00:10:00\", \"tkTime\": \"2019-10-29 21:10:00\", \"lowestPriceInfo\": {\"discount\": 10.0, \"price\": 1620, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU9317\", \"onTimeRate\": 75.28, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"上海航空有限公司\", \"leaveBuilding\": \"T1航站楼\", \"transferList\": [], \"leavePort\": \"浦东国际机场\", \"arTime\": \"2019-10-30 00:10:00\", \"tkTime\": \"2019-10-29 21:10:00\", \"lowestPriceInfo\": {\"discount\": 10.0, \"price\": 1620, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"FM9317\", \"onTimeRate\": 75.28, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国南方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-30 00:25:00\", \"tkTime\": \"2019-10-29 21:50:00\", \"lowestPriceInfo\": {\"discount\": 4.8, \"price\": 780, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"CZ3180\", \"onTimeRate\": 0.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T2航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-30 00:40:00\", \"tkTime\": \"2019-10-29 22:00:00\", \"lowestPriceInfo\": {\"discount\": 4.3, \"price\": 700, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU5311\", \"onTimeRate\": 98.32, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 10:40:00\", \"tkTime\": \"2019-10-29 08:15:00\", \"lowestPriceInfo\": {\"discount\": 8.3, \"price\": 1349, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU4675\", \"onTimeRate\": 0.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"金鹏航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"浦东国际机场\", \"arTime\": \"2019-10-29 11:35:00\", \"tkTime\": \"2019-10-29 09:00:00\", \"lowestPriceInfo\": {\"discount\": 7.6, \"price\": 1236, \"standardPrice\": 1236, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"Y87132\", \"onTimeRate\": 0.0, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"中国东方航空股份有限公司\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 20:05:00\", \"tkTime\": \"2019-10-29 17:40:00\", \"lowestPriceInfo\": {\"discount\": 8.3, \"price\": 1349, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"MU4673\", \"onTimeRate\": 94.87, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"春秋航空\", \"leaveBuilding\": \"T1航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 10:00:00\", \"tkTime\": \"2019-10-29 07:25:00\", \"lowestPriceInfo\": {\"discount\": 7.1, \"price\": 1150, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"9C8835\", \"onTimeRate\": 96.61, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"春秋航空\", \"leaveBuilding\": \"T1航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-30 00:40:00\", \"tkTime\": \"2019-10-29 22:00:00\", \"lowestPriceInfo\": {\"discount\": 5.6, \"price\": 910, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"9C8929\", \"onTimeRate\": 98.32, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"春秋航空\", \"leaveBuilding\": \"T1航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 15:45:00\", \"tkTime\": \"2019-10-29 13:10:00\", \"lowestPriceInfo\": {\"discount\": 8.1, \"price\": 1320, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"9C8855\", \"onTimeRate\": 93.1, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"春秋航空\", \"leaveBuilding\": \"T1航站楼\", \"transferList\": [], \"leavePort\": \"虹桥国际机场\", \"arTime\": \"2019-10-29 20:30:00\", \"tkTime\": \"2019-10-29 18:05:00\", \"lowestPriceInfo\": {\"discount\": 6.6, \"price\": 1070, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"9C8931\", \"onTimeRate\": 98.32, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}, {\"airlineCompany\": \"春秋航空\", \"leaveBuilding\": \"T2航站楼\", \"transferList\": [], \"leavePort\": \"浦东国际机场\", \"arTime\": \"2019-10-30 01:40:00\", \"tkTime\": \"2019-10-29 22:55:00\", \"lowestPriceInfo\": {\"discount\": 5.1, \"price\": 830, \"standardPrice\": 1620, \"oilFee\": 0, \"buildTax\": 50}, \"arriveCity\": \"广州\", \"leaveCity\": \"上海\", \"flightNo\": \"9C8541\", \"onTimeRate\": 98.32, \"arrivePort\": \"新白云国际机场\", \"arriveBuilding\": \"T1航站楼\"}]}";
            result.setData(flightInfo);
        } catch (Exception e) {
            e.printStackTrace();
            result.mark("查询失败");
        }
        return result;
    }
}
